package com.gccloud.design.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gccloud.design.utils.elTree.DataTree;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 实现功能【障碍原因实体类】
 *
 * @author hu.hongdou
 * @date 2022/2/21 14:16
 */
@Data
@ApiModel("障碍原因实体")
@Accessors(chain = true)
@ToString(callSuper = true)
@TableName("dic_reason")
public class DICReasonEntity implements DataTree<DICReasonEntity> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("故障原因ID")
    @TableField("REASON_ID")
    private String id;

    @ApiModelProperty("分片ID")
    private Integer shardingId;

    /**
     * 故障原因名称
     */
    @ApiModelProperty("故障原因名称")
    @TableField("REASON_NAME")
    private String label;

    /**
     * 故障原因编码，和现象ID保持一致
     */
    @ApiModelProperty("故障原因编码，和现象ID保持一致")
    private String reasonCd;

    /**
     * 父故障原因ID
     */
    @ApiModelProperty("父故障原因ID")
    @TableField("P_REASON_ID")
    private String parentId;

    /**
     * 序列
     */
    @ApiModelProperty("序列")
    private String seq;

    /**
     * 是否是叶子节点
     */
    @ApiModelProperty("是否是叶子节点")
    private Integer leafFlag;

    /**
     * 产品类型 对应的是业务字典
     */
    @ApiModelProperty("产品类型 对应的是业务字典")
    private Integer prodClass;

    /**
     * 删除标识
     */
    @ApiModelProperty("删除标识")
    private Integer delFlag;

    @Override
    public void setChildList(List<DICReasonEntity> childList) {
        this.childList = childList;
    }

    private List<DICReasonEntity> childList;
}
